<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>

<html>
<head>
<title>G2econ</title>
<style type="text/css">


div.left_col {width:150px; float:left;}
div.right_col { float:right;}

</style>

</head>

<body>

<%
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();
    if (user != null) {
%>
<p>Hello, <%= user.getNickname() %>! (You can <a
	href="<%= userService.createLogoutURL(request.getRequestURI()) %>">sign
out</a>.)</p>
<%
    } else {
%>
<p>Hello! (You can <a
	href="<%= userService.createLoginURL(request.getRequestURI()) %>">sign
in</a>.)</p>
<%
    }
%>

<form action="/BudgetFigure/Create" method="post">
	<fieldset style="width:350px;">
		<legend>e-conomic login </legend>	
		
		<div class="left_col">Agreement number: </div>
		<div class="right_col"><input type="text" name="economicAgreementNumber"></input></div>
		<div style="clear:both;"></div>

		<div class="left_col">User name: </div>
		<div class="right_col"><input type="text" name="economicUserName"></input></div>
		<div style="clear:both;"></div>
		
		<div class="left_col">Password: </div>
		<div class="right_col"><input type="text" name="economicPassword"></input></div>
		<div style="clear:both;"></div>
	</fieldset>
	<br />
	<br />

	<fieldset style="width:350px;">
	<legend>Budget figure </legend>	
		<div class="left_col">Account number: </div>
		<div class="right_col"><input type="text" name="accountNumber"></input></div>
		<div style="clear:both;"></div>
		
		<div>Text: </div>
		<div><textarea name="text" rows="3" cols="41"></textarea></div>
		
		<div class="left_col">From date: </div>
		<div class="right_col"><input type="text" name="fromDate"></input></div>
		<div style="clear:both;"></div>
		
		<div class="left_col">To date: </div>
		<div class="right_col"><input type="text" name="toDate"></input></div>
		<div style="clear:both;"></div>
		
		<div class="left_col">Amount: </div> 
		<div class="right_col"><input type="text" name="amount"></input></div>
		<div style="clear:both;"></div>
		
		<input type="hidden" name="rowNumber" value="1"></input>
		<div><input type="submit" value="Create budget figure" /></div>
	</fieldset>
</form>

<br />
<br />
Developed by
<a href="http://www.copenhagensoftware.com">Copenhagen Software</a>
</body>
</html>